package com.ldl.exam.constant;

/**
 * @author liudaolin
 * @version 1.0
 * @date 2022/10/04 21:28:56
 */
public interface Constants {

    String STU_LOGIN_KEY = "stuLogin";

    String USER_LOGIN_KEY = "userLogin";
    
    int USER_ROLE_ADMIN = 1;
    int USER_ROLE_TEACHER = 2;

    /**
     * 保存登录凭证的 cookie 的 name
     */
    String LOGIN_TOKEN_KEY = "login_token";

    /**
     * 未登录时, AjaxResult 中 data = 1
     */
    String AJAX_RESULT_NO_LOGIN = "1";

    int DEFAULT_PAGE_NUM = 1;
    int DEFAULT_PAGE_SIZE = 5;


    /**
     * 默认最大可违规次数
     */
    int DEFAULT_VIOLATIONS_COUNT = 3;
    // 考试状态: 1已创建, 2考试中, 3考试结束, 4已统计排名, -1已删除
    int EXAM_CREATED = 1;
    int EXAM_DOING = 2;
    int EXAM_FINISHED = 3;
    int EXAM_RANKED = 4;
    int EXAM_DELETED = -1;

    // 题型: 1 选择题,2 简答题,3 编程题
    int CHOICE_QUESTION_TYPE = 1;
    int SHORT_QUESTION_TYPE = 2;
    int PROGRAMMING_QUESTION_TYPE = 3;

    // 状态: 1正常, 2已毕业, 3待审核, -1已删除
    int STU_OK = 1;
    int STU_GRADUATED = 2;
    int STU_AUDITING = 3;
    int STU_DELETED = -1;

    // 学生试卷未批改的状态值
    int STU_EXAM_PAPER_INIT = -1;

    String DEFAULT_PWD = "1";
}
